package com.atde._03_creational_design_patterns.fcatory.simplefactory.pizzastore.pizza;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.simplefactory.pizzastore.pizza
 * @Author: Del
 * @CreateTime: 2025-06-02  23:00
 * @Description: 披萨类 -- 抽象类
 * @Version: 1.0
 */
public abstract class Pizza {

    //  披萨名称
    protected String name;

    // 将准备不同披萨原材料不一样的代码抽象出来，具体的由子类实现
    public abstract void prepare();

    //  烘烤
    public void bake() {
        System.out.println(name + " baking;");
    }

    // 切
    public void cut() {
        System.out.println(name + " cutting;");
    }

    //  打包
    public void box() {
        System.out.println(name + " boxing;");
    }

     //  设置名字
    public void setName(String name) {
        this.name = name;
    }
}
